function refresh(){
	try{
		listDayReport();
		listMonthReport();
		}catch(e){
		}
}

$(function(){
	listDayReport();
	listMonthReport();
});
var dataHand = new AjaxHandler();
var psid = param.psid;
$("#month").val(new Date().format("yyyy-MM"));
/**
 * 日报?a=0&b=4
 * */
function listDayReport(){
	$.proAjax({
		url: "/mobile/dayreport",
		data: { month: $("#month").val(), psid:psid },
		success: function (data) {
			dataHand.arrayAddToHtml("dayReportModel",data,"dayline",function(elm,datas){
					elm.find("a").off("click");
					(function(m,d){
						m.on("tap",function(e){
							e.preventDefault();
							e.stopPropagation();
							router.href(m.attr("href"),d);
						})
					}(elm.find("a"),datas.params))
			});
			
		}
	});
}


$("#year").val(new Date().format("yyyy"));
/**
 * 月报
 * */
function listMonthReport(){
	$.proAjax({
		url: "/mobile/monthreport",
		data: { year: $("#year").val(), psid:psid },
		success: function (data) {
			dataHand.arrayAddToHtml("monthReportModel",data,"monthline",function(elm,datas){
				
				elm.find("a").off("click");
				(function(m,d){
					m.on("tap",function(e){
						e.preventDefault();
						e.stopPropagation();
						router.href(m.attr("href"),d);
					})
				}(elm.find("a"),datas.params))
				
			});
		}
	});
	
	
}